using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CordTrigger : MonoBehaviour
{
    private CircleCollider2D collide;
    public void Awake()
    {
        collide = GetComponent<CircleCollider2D>();    
    }

    public void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.CompareTag("Wall"))
        {
            collide.isTrigger = false;
        }
    }
    public void OnTriggerExit2D(Collider2D collision)
    {
        if(collision.CompareTag("Wall"))
        {
            collision.isTrigger = true;
        }
    }
}
